﻿using System.Collections.Generic;
using System.Data;
using PPI.Entities.Lookup;
using VMind.Global;


namespace PPI.Client.Logic.Distribution
{
    public class LSpecie
    {
        public static List<EXMissionStructures_PoleSpecies> SelectAllIdName()
        {
            DataTable dt = WebConsumer.Distribution.WDistributionSpecie.SelectAllIdName().Tables[0];
            List<EXMissionStructures_PoleSpecies> lstSpecies = new List<EXMissionStructures_PoleSpecies>();

            foreach (DataRow drSpecie in dt.Rows)
            {
                EXMissionStructures_PoleSpecies specieEntity = new EXMissionStructures_PoleSpecies();

                specieEntity.Id = ConvertHelper.ToInt32(drSpecie["XMissionStructures_PoleSpeciesId"]);
                specieEntity.Name = drSpecie["Name"].ToString();

                lstSpecies.Add(specieEntity);
            }

            return lstSpecies;
        }
    }
}
